Developer Documentation

QuickTime 4 API Documentation

3D Graphics Programming with QuickDraw 3D 1.5.4

Previous | QD3D Book | Overview | Chapter Contents | Next |

Setting Points and Vectors

QuickDraw 3D supplies routines that you can use to set the components of a point or vector. You must already have allocated space for the point or vector before attempting to modify its contents.

Q3Point2D_Set

You can use the Q3Point2D_Set function to set the coordinates of a two-dimensional point.

TQ3Point2D *Q3Point2D_Set (
                     TQ3Point2D *point2D,
                     float x,
                     float y);
point2D
A two-dimensional point.
x
The x coordinate of the point.
y
The y coordinate of the point.

DESCRIPTION

The Q3Point2D_Set function returns, as its function result and in the point2D parameter, the two-dimensional point specified by the x and y parameters.

Q3Param2D_Set

You can use the Q3Param2D_Set function to set the components of a two-dimensional parametric point.

TQ3Param2D *Q3Param2D_Set (
                     TQ3Param2D *param2D,
                     float u,
                     float v);
param2D
A parametric point.
u
The u component of the parametric point.
v
The v component of the parametric point.

DESCRIPTION

The Q3Param2D_Set function returns, as its function result and in the param2D parameter, the two-dimensional parametric point specified by the u and v parameters.

Q3Point3D_Set

You can use the Q3Point3D_Set function to set the coordinates of a three-dimensional point.

TQ3Point3D *Q3Point3D_Set (
                     TQ3Point3D *point3D,
                     float x,
                     float y,
                     float z);
point3D
A three-dimensional point.
x
The x coordinate of the point.
y
The y coordinate of the point.
z
The z coordinate of the point.

DESCRIPTION

The Q3Point3D_Set function returns, as its function result and in the point3D parameter, the three-dimensional point specified by the x , y , and z parameters.

Q3RationalPoint3D_Set

You can use the Q3RationalPoint3D_Set function to set the coordinates of a three-dimensional rational point.

TQ3RationalPoint3D *Q3RationalPoint3D_Set (
                     TQ3RationalPoint3D *point3D,
                     float x,
                     float y,
                     float w);
point3D
A three-dimensional point.
x
The x coordinate of the point.
y
The y coordinate of the point.
w
The w coordinate of the point.

DESCRIPTION

The Q3RationalPoint3D_Set function returns, as its function result and in the point3D parameter, the three-dimensional rational point specified by the x , y , and w parameters.

Q3RationalPoint4D_Set

You can use the Q3RationalPoint4D_Set function to set the coordinates of a four-dimensional rational point.

TQ3RationalPoint4D *Q3RationalPoint4D_Set (
                     TQ3RationalPoint4D *point4D,
                     float x,
                     float y,
                     float z,
                     float w);
point4D
A four-dimensional point.
x
The x coordinate of the point.
y
The y coordinate of the point.
z
The z coordinate of the point.
w
The w coordinate of the point.

DESCRIPTION

The Q3RationalPoint4D_Set function returns, as its function result and in the point4D parameter, the four-dimensional rational point specified by the x , y , z , and w parameters.

Q3PolarPoint_Set

You can use the Q3PolarPoint_Set function to set the components of a polar point.

TQ3PolarPoint *Q3PolarPoint_Set (
                     TQ3PolarPoint *polarPoint,
                     float r,
                     float theta);
polarPoint
A polar point.
r
The r component of the polar point.
theta
The component of the polar point.

DESCRIPTION

The Q3PolarPoint_Set function returns, as its function result and in the polarPoint parameter, the polar point specified by the r and theta parameters.

Q3SphericalPoint_Set

You can use the Q3SphericalPoint_Set function to set the components of a spherical point.

TQ3SphericalPoint *Q3SphericalPoint_Set (
                     TQ3SphericalPoint *sphericalPoint,
                     float rho,
                     float theta,
                     float phi);
sphericalPoint
A spherical point.
rho
The component of the spherical point.
theta
The component of the spherical point.
phi
The component of the spherical point.

DESCRIPTION

The Q3SphericalPoint_Set function returns, as its function result and in the sphericalPoint parameter, the spherical point specified by the rho , theta , and phi parameters.

Q3Vector2D_Set

You can use the Q3Vector2D_Set function to set the scalar components of a two-dimensional vector.

TQ3Vector2D *Q3Vector2D_Set (
                     TQ3Vector2D *vector2D,
                     float x,
                     float y);
vector2D
A two-dimensional vector.
x
The x scalar component of the vector.
y
The y scalar component of the vector.

DESCRIPTION

The Q3Vector2D_Set function returns, as its function result and in the vector2D parameter, the two-dimensional vector whose scalar components are specified by the x and y parameters.

Q3Vector3D_Set

You can use the Q3Vector3D_Set function to set the scalar components of a three-dimensional vector.

TQ3Vector3D *Q3Vector3D_Set (
                     TQ3Vector3D *vector3D,
                     float x,
                     float y,
                     float z);
vector3D
A three-dimensional vector.
x
The x scalar component of the vector.
y
The y scalar component of the vector.
z
The z scalar component of the vector.

DESCRIPTION

The Q3Vector3D_Set function returns, as its function result and in the vector3D parameter, the three-dimensional vector whose scalar components are specified by the x , y , and z parameters.


© 1997 Apple Computer, Inc.

Previous | QD3D Book | Overview | Chapter Contents | Next |